package com.infocoll.pachou.repository;

import com.infocoll.pachou.bean.User;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

import java.util.Optional;

public interface UserRepository extends CrudRepository<User,Long> {
//    @Query("Select user from User user where user.user_lang=?1 and user.user_xuhao=?2")
    Optional<User> findByUserlangAndUserxuhao(String user_lang, String user_xuhao);

//    @Query("Select user from User user where user.user_lang=?1 and ( user.user_cmnname=?2 or user.user_latname=?2  )")
    Iterable<User> findAllByUserlangAndUsercmnnameOrUserlatname(String user_lang, String user_name,String user_name1);
}
